package com.ruoyi.system.service.impl;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: wenqh
 * @Date: 2024/10/24/20:47
 * @Description:
 */

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CusBehaviorRecordMapper;
import com.ruoyi.system.domain.CusBehaviorRecord;
import com.ruoyi.system.service.ICusBehaviorRecordService;

/**
 * 用户行为分析记录Service业务层处理
 *
 * @author ruoyi
 * @date 2024-10-24
 */
@Service
public class CusBehaviorRecordServiceImpl implements ICusBehaviorRecordService
{
    @Autowired
    private CusBehaviorRecordMapper cusBehaviorRecordMapper;

    /**
     * 查询用户行为分析记录
     *
     * @param id 用户行为分析记录主键
     * @return 用户行为分析记录
     */
    @Override
    public CusBehaviorRecord selectCusBehaviorRecordById(Long id)
    {
        return cusBehaviorRecordMapper.selectCusBehaviorRecordById(id);
    }

    /**
     * 查询用户行为分析记录列表
     *
     * @param cusBehaviorRecord 用户行为分析记录
     * @return 用户行为分析记录
     */
    @Override
    public List<CusBehaviorRecord> selectCusBehaviorRecordList(CusBehaviorRecord cusBehaviorRecord)
    {
        return cusBehaviorRecordMapper.selectCusBehaviorRecordList(cusBehaviorRecord);
    }

    /**
     * 新增用户行为分析记录
     *
     * @param cusBehaviorRecord 用户行为分析记录
     * @return 结果
     */
    @Override
    public int insertCusBehaviorRecord(CusBehaviorRecord cusBehaviorRecord)
    {
        cusBehaviorRecord.setCreateTime(DateUtils.getNowDate());
        return cusBehaviorRecordMapper.insertCusBehaviorRecord(cusBehaviorRecord);
    }

    /**
     * 修改用户行为分析记录
     *
     * @param cusBehaviorRecord 用户行为分析记录
     * @return 结果
     */
    @Override
    public int updateCusBehaviorRecord(CusBehaviorRecord cusBehaviorRecord)
    {
        return cusBehaviorRecordMapper.updateCusBehaviorRecord(cusBehaviorRecord);
    }

    /**
     * 批量删除用户行为分析记录
     *
     * @param ids 需要删除的用户行为分析记录主键
     * @return 结果
     */
    @Override
    public int deleteCusBehaviorRecordByIds(Long[] ids)
    {
        return cusBehaviorRecordMapper.deleteCusBehaviorRecordByIds(ids);
    }

    /**
     * 删除用户行为分析记录信息
     *
     * @param id 用户行为分析记录主键
     * @return 结果
     */
    @Override
    public int deleteCusBehaviorRecordById(Long id)
    {
        return cusBehaviorRecordMapper.deleteCusBehaviorRecordById(id);
    }
}

